<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>The SplTempFileObject class</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="splfileobject.valid.html">SplFileObject::valid</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="spltempfileobject.construct.html">SplTempFileObject::__construct</a></div>
 <div class="up"><a href="spl.files.html">文件处理</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="class.spltempfileobject" class="reference">

 <h1 class="title">The SplTempFileObject class</h1>
 

 <div class="partintro"><p class="verinfo">(PHP 5 &gt;= 5.1.2)</p>


  <div class="section" id="spltempfileobject.intro">
   <h2 class="title">简介</h2>
   <p class="para">
    The SplTempFileObject class offers an object oriented interface for a temporary file.
   </p>
  </div>


  <div class="section" id="spltempfileobject.synopsis">
   <h2 class="title">类摘要</h2>


   <div class="classsynopsis">
    <div class="ooclass"></div>


    <div class="classsynopsisinfo">
     <span class="ooclass">
      <strong class="classname">SplTempFileObject</strong>
     </span>
     
     <span class="ooclass">
      <span class="modifier">extends</span>
      <a href="class.splfileobject.html" class="classname">SplFileObject</a>
     </span>
     
     <span class="oointerface">implements 
      <span class="interfacename"><a href="class.seekableiterator.html" class="interfacename">SeekableIterator</a></span>
     </span>

     <span class="oointerface">, 
      <span class="interfacename"><a href="class.recursiveiterator.html" class="interfacename">RecursiveIterator</a></span>
     </span>
     {</div>

    
    <div class="classsynopsisinfo classsynopsisinfo_comment">/* 方法 */</div>
    <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><a href="spltempfileobject.construct.html" class="methodname">__construct</a></span>
    ([ <span class="methodparam"><span class="type">int</span> <code class="parameter">$max_memory</code></span>
  ] )</div>

    
    <div class="classsynopsisinfo classsynopsisinfo_comment">/* 继承的方法 */</div>
    <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><a href="splfileobject.construct.html" class="methodname">SplFileObject::__construct</a></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$filename</code></span>
   [, <span class="methodparam"><span class="type">string</span> <code class="parameter">$open_mode</code><span class="initializer"> = &quot;r&quot;</span></span>
   [, <span class="methodparam"><span class="type">bool</span> <code class="parameter">$use_include_path</code><span class="initializer"> = false</span></span>
   [, <span class="methodparam"><span class="type">resource</span> <code class="parameter">$context</code></span>
  ]]] )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">string|array</span><span class="methodname"><a href="splfileobject.current.html" class="methodname">SplFileObject::current</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">bool</span><span class="methodname"><a href="splfileobject.eof.html" class="methodname">SplFileObject::eof</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">bool</span><span class="methodname"><a href="splfileobject.fflush.html" class="methodname">SplFileObject::fflush</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">string</span><span class="methodname"><a href="splfileobject.fgetc.html" class="methodname">SplFileObject::fgetc</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">array</span><span class="methodname"><a href="splfileobject.fgetcsv.html" class="methodname">SplFileObject::fgetcsv</a></span>
    ([ <span class="methodparam"><span class="type">string</span> <code class="parameter">$delimiter</code><span class="initializer"> = &quot;,&quot;</span></span>
   [, <span class="methodparam"><span class="type">string</span> <code class="parameter">$enclosure</code><span class="initializer"> = &quot;\&quot;&quot;</span></span>
   [, <span class="methodparam"><span class="type">string</span> <code class="parameter">$escape</code><span class="initializer"> = &quot;\\&quot;</span></span>
  ]]] )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">string</span><span class="methodname"><a href="splfileobject.fgets.html" class="methodname">SplFileObject::fgets</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">string</span><span class="methodname"><a href="splfileobject.fgetss.html" class="methodname">SplFileObject::fgetss</a></span>
    ([ <span class="methodparam"><span class="type">string</span> <code class="parameter">$allowable_tags</code></span>
  ] )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">bool</span><span class="methodname"><a href="splfileobject.flock.html" class="methodname">SplFileObject::flock</a></span>
    ( <span class="methodparam"><span class="type">int</span> <code class="parameter">$operation</code></span>
   [, <span class="methodparam"><span class="type">int</span> <code class="parameter reference">&$wouldblock</code></span>
  ] )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">int</span><span class="methodname"><a href="splfileobject.fpassthru.html" class="methodname">SplFileObject::fpassthru</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">int</span><span class="methodname"><a href="splfileobject.fputcsv.html" class="methodname">SplFileObject::fputcsv</a></span>
    ( <span class="methodparam"><span class="type">array</span> <code class="parameter">$fields</code></span>
   [, <span class="methodparam"><span class="type">string</span> <code class="parameter">$delimiter</code><span class="initializer"> = &#039;,&#039;</span></span>
   [, <span class="methodparam"><span class="type">string</span> <code class="parameter">$enclosure</code><span class="initializer"> = &#039;&quot;&#039;</span></span>
  ]] )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">mixed</span><span class="methodname"><a href="splfileobject.fscanf.html" class="methodname">SplFileObject::fscanf</a></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$format</code></span>
   [, <span class="methodparam"><span class="type"><a href="language.pseudo-types.html#language.types.mixed" class="type mixed">mixed</a></span> <code class="parameter reference">&$...</code></span>
  ] )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">int</span><span class="methodname"><a href="splfileobject.fseek.html" class="methodname">SplFileObject::fseek</a></span>
    ( <span class="methodparam"><span class="type">int</span> <code class="parameter">$offset</code></span>
   [, <span class="methodparam"><span class="type">int</span> <code class="parameter">$whence</code><span class="initializer"> = SEEK_SET</span></span>
  ] )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">array</span><span class="methodname"><a href="splfileobject.fstat.html" class="methodname">SplFileObject::fstat</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">int</span><span class="methodname"><a href="splfileobject.ftell.html" class="methodname">SplFileObject::ftell</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">bool</span><span class="methodname"><a href="splfileobject.ftruncate.html" class="methodname">SplFileObject::ftruncate</a></span>
    ( <span class="methodparam"><span class="type">int</span> <code class="parameter">$size</code></span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">int</span><span class="methodname"><a href="splfileobject.fwrite.html" class="methodname">SplFileObject::fwrite</a></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$str</code></span>
   [, <span class="methodparam"><span class="type">int</span> <code class="parameter">$length</code></span>
  ] )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">void</span><span class="methodname"><a href="splfileobject.getchildren.html" class="methodname">SplFileObject::getChildren</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">array</span><span class="methodname"><a href="splfileobject.getcsvcontrol.html" class="methodname">SplFileObject::getCsvControl</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">int</span><span class="methodname"><a href="splfileobject.getflags.html" class="methodname">SplFileObject::getFlags</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">int</span><span class="methodname"><a href="splfileobject.getmaxlinelen.html" class="methodname">SplFileObject::getMaxLineLen</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">bool</span><span class="methodname"><a href="splfileobject.haschildren.html" class="methodname">SplFileObject::hasChildren</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">int</span><span class="methodname"><a href="splfileobject.key.html" class="methodname">SplFileObject::key</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">void</span><span class="methodname"><a href="splfileobject.next.html" class="methodname">SplFileObject::next</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">void</span><span class="methodname"><a href="splfileobject.rewind.html" class="methodname">SplFileObject::rewind</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">void</span><span class="methodname"><a href="splfileobject.seek.html" class="methodname">SplFileObject::seek</a></span>
    ( <span class="methodparam"><span class="type">int</span> <code class="parameter">$line_pos</code></span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">void</span><span class="methodname"><a href="splfileobject.setcsvcontrol.html" class="methodname">SplFileObject::setCsvControl</a></span>
    ([ <span class="methodparam"><span class="type">string</span> <code class="parameter">$delimiter</code><span class="initializer"> = &quot;,&quot;</span></span>
   [, <span class="methodparam"><span class="type">string</span> <code class="parameter">$enclosure</code><span class="initializer"> = &quot;\&quot;&quot;</span></span>
   [, <span class="methodparam"><span class="type">string</span> <code class="parameter">$escape</code><span class="initializer"> = &quot;\\&quot;</span></span>
  ]]] )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">void</span><span class="methodname"><a href="splfileobject.setflags.html" class="methodname">SplFileObject::setFlags</a></span>
    ( <span class="methodparam"><span class="type">int</span> <code class="parameter">$flags</code></span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">void</span><span class="methodname"><a href="splfileobject.setmaxlinelen.html" class="methodname">SplFileObject::setMaxLineLen</a></span>
    ( <span class="methodparam"><span class="type">int</span> <code class="parameter">$max_len</code></span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">void</span><span class="methodname"><a href="splfileobject.tostring.html" class="methodname">SplFileObject::__toString</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">bool</span><span class="methodname"><a href="splfileobject.valid.html" class="methodname">SplFileObject::valid</a></span>
    ( <span class="methodparam">void</span>
   )</div>


   }</div>


  </div>

 </div>

 








<h2>Table of Contents</h2><ul class="chunklist chunklist_reference"><li><a href="spltempfileobject.construct.html">SplTempFileObject::__construct</a> — Construct a new temporary file object</li></ul>
</div>
<hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="splfileobject.valid.html">SplFileObject::valid</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="spltempfileobject.construct.html">SplTempFileObject::__construct</a></div>
 <div class="up"><a href="spl.files.html">文件处理</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
